<template>
	<el-row :gutter="10">
		<el-col v-for="(chart, index) in charts" :key="index"
			v-if="!chart.disabled"
			:xs="24" 
			:sm="24" 
			:md="24" 
			:lg="chart.columns ? chart.columns : 12"
			style="height: 400px;margin-bottom:10px"
			>
			<wt-chart-box :chart="chart" ></wt-chart-box>
		</el-col>
	</el-row>
</template>
<script>
	import Vue from 'vue'
	import ElementUI from 'element-ui'
	import ChartBox from 'winged/components/wt-chart-box'
	// 按需引用所用到的图表类型
	import 'echarts/lib/chart/bar';
	import 'echarts/lib/component/title';
	import top5case from '../js/charts/top5case';
	import top5surgery from '../js/charts/top5surgery';
	import last12admission from '../js/charts/last12admission';
	import agestatistics from '../js/charts/agestatistics';
	import followup from '../js/charts/followup';
	import last12cases from '../js/charts/last12cases';
	import diagnose from '../js/charts/diagnose';
	import allsurgery from '../js/charts/allsurgery';
	Vue.use(ElementUI);
	Vue.component(ChartBox.name, ChartBox);

	const config = [
		top5case,
		diagnose,
        top5surgery,
		allsurgery,
		{
			title: '患者年龄统计',
			disabled:true
		},
		{
			title: '随访患者的统计',
			disabled:true
		},
		{
			title: '近12个月病例统计',
			disabled:true
		},
//		agestatistics,
//		followup,
//		last12cases,
		last12admission,
	];

	export default {
		name: 'wt-statistics-index',
		data() {
			return {
				charts: config
			}
		},
	}
</script>